#ifndef __CMD_CP_H__
#define __CMD_CP_H__

#include "cmd_handle.h"

#define SIZE_SRC_FILE_NAME 128

typedef enum {
	FT_FILE=1,
	FT_DIR,
	FT_OTHER,
	FT_ERROR=1000,
}FILE_TYPE;

typedef struct {
	FILE_TYPE ft;
	char src_file_name[SIZE_SRC_FILE_NAME];
}fileInfo_t;
int operate_cp(command_t*);
void cmd_cp_parse_srcpath(command_t* cmd,fileInfo_t* file);  
FILE_TYPE cmd_cp_parse_filetype(fileInfo_t* file);
int file_isExist(char* name);
int cmd_cp_file(fileInfo_t,char* dest);
int cmd_cp_exec(fileInfo_t* file,command_t* cmd);
int cmd_cp_dir(fileInfo_t file,char* dest);
#endif

